#ifndef NINJIBRARYSFML_H
#define NINJIBRARYSFML_H

/*******************************

Author: Ninjaboi ; Date(last update): 12-13-11 ; Title: Ninjibrary ;

Website: http://www.ninjasoftcorp.webs.com/index.html

----------
An SFML wrapper library that helps with GUI, debugging, input/output,
sound, windows, and other factors in an application.
----------

Language(s): C++.
Library(ies): SFML.
Extention(s): N/A.
Platform(s): N/A.
Compiler(s): Visual Studio 2008 Compiler.

The following is a list of sources that which might be interesting for anyone
wanting to check them out. I do not own anything in the links/sources given,
and they are only presented to give a reference to material I've used for a
foundation of either information or programming purposes.

*^*^*^*^*^*^*^---Source(s)---*^*^*^*^*^*^*^*^*

SFML home page: http://www.sfml-dev.org/

*^*^*^*^*^*^*^---Source(s)---*^*^*^*^*^*^*^*^*

*^*^*^*^*^*^*^---NOTICE---*^*^*^*^*^*^*^*^*
This source file and code is owned by Danny Dewayne McGill
( aka, Ninjaboi ). It is protected in that it cannot be copied/used
without permission from the creator/owner. This includes all
resources/extentions made by Ninjaboi as well.
*^*^*^*^*^*^*^---NOTICE---*^*^*^*^*^*^*^*^*

*******************************/

/***Library includes***/
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
/*^^Library includes^^*/


/***Extention includes***/

/*^^Extention includes^^*/


/***Self-made includes***/

/*^^Self-made includes^^*/


/***Standard-library includes***/
#include <iostream>
#include <string>
#include <fstream>
#include <cstdlib>
#include <stdio.h>
#include <ctime>
#include <sstream>
#include "stddef.h"
/*^^Standard-library includes^^*/



/*-*-* DEBUGGING SECTION *-*-*/

namespace Ninja
{

	class Debugger
	{
	public:

		// The default constructor.
		Debugger();

		// Define the filename/location of the debugging file.
		Debugger( std::string debugfilename );

		// The default deconstructor.
		~Debugger();

		// Define the filename/location of the debugging file.
		void SetDebugFile( std::string debugfilename );

		// Sends a message to the console window for debugging purposes.
		void DebugMessage( std::string debugText1,
						   std::string debugText2,
						   std::string debugText3 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( std::string debugText1,
						   std::string debugText2 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( std::string debugText1 );

		// Sends a message to the console window for debugging purposes.
		void DebugMessage( int debugText1,
						   int debugText2, 
						   int debugText3 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( int debugText1,
						   int debugText2 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( int debugText1 );

		// Sends a message to the console window for debugging purposes.
		void DebugMessage( char debugText1,
						   char debugText2,
						   char debugText3 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( char debugText1,
						   char debugText2 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( char debugText1 );

		// Sends a message to the console window for debugging purposes.
		void DebugMessage( short debugText1,
						   short debugText2,
						   short debugText3 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( short debugText1,
						   short debugText2 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( short debugText1 );

		// Sends a message to the console window for debugging purposes.
		void DebugMessage( long debugText1,
						   long debugText2,
						   long debugText3 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( long debugText1,
						   long debugText2 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( long debugText1 );

		// Sends a message to the console window for debugging purposes.
		void DebugMessage( float debugText1,
						   float debugText2,
						   float debugText3 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( float debugText1, 
						   float debugText2 );
		// Sends a message to the console window for debugging purposes.
		void DebugMessage( float debugText1 );

	private:
	
		// File stream to create and add text to a debugger text document.
		std::ofstream debugTxt;

		// File name/location that will be the debugger file.
		std::string debugFileName;
	
	};

	// The default constructor.
	Debugger::Debugger()
	{

		// The default constructor.
	
	}

	// Define the filename/location of the debugging file.
	Debugger::Debugger( std::string debugfilename )
	{
	
		debugFileName = debugfilename;
	
	}

	// The default deconstructor.
	Debugger::~Debugger()
	{
	
		// The default deconstructor.
	
	}

	// Define the filename/location of the debugging file.
	void Debugger::SetDebugFile( std::string debugfilename )
	{
	
		debugFileName = debugfilename;
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( std::string debugText1,
								 std::string debugText2,
								 std::string debugText3 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
		debugTxt << debugText3 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
		std::cout << debugText3 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( std::string debugText1,
								 std::string debugText2 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( std::string debugText1 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( int debugText1,
								 int debugText2,
								 int debugText3 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
		debugTxt << debugText3 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
		std::cout << debugText3 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( int debugText1,
								 int debugText2 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( int debugText1 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( char debugText1,
								 char debugText2,
								 char debugText3 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
		debugTxt << debugText3 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
		std::cout << debugText3 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( char debugText1,
								 char debugText2 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( char debugText1 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( short debugText1,
								 short debugText2,
								 short debugText3 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
		debugTxt << debugText3 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
		std::cout << debugText3 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( short debugText1,
								 short debugText2 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( short debugText1 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( long debugText1,
								 long debugText2,
								 long debugText3 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
		debugTxt << debugText3 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
		std::cout << debugText3 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( long debugText1,
								 long debugText2 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( long debugText1 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( float debugText1,
								 float debugText2,
								 float debugText3 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
		debugTxt << debugText3 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
		std::cout << debugText3 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( float debugText1,
								 float debugText2 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
		debugTxt << debugText2 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
		std::cout << debugText2 << "\n";
	
	}

	// Sends a message to the console window for debugging purposes.
	void Debugger::DebugMessage( float debugText1 )
	{

		// Opens/creates debugging document.
		debugTxt.open( debugFileName.c_str(), std::ios::out | std::ios::app );
	
		// Writes to the file our debugging message.
		debugTxt << debugText1 << std::endl;
	
		// Sends debug message.
		std::cout << debugText1 << "\n";
	
	}

}

/*^*^* DEBUGGING SECTION *^*^*/



/*-*-* GRAPHICS SECTION *-*-*/

namespace Ninja
{

	class Image
	{
	public:

		// Loads an image from a file, and converts it into a sprite for drawing.
		sf::Image LoadImg( const std::string filelocation );

	private:

		// Creates the temporary image to store a file.
		sf::Image tempImage;
	
	};

	// Loads an image from a file, and converts it into a sprite for drawing.
	sf::Image Image::LoadImg( const std::string filelocation )
	{

		// Attempts to load the image.
		if ( !tempImage.LoadFromFile( filelocation ) )
		{

			// Loading failed.

		}else
		{
		
			// Message stating if the image was loaded successfully.
		
		}

		// Sends out image.
		return tempImage;
	
	}

	class Sprite
	{
	public:

		// Sets the image for the sprite.
		void SetImage( const sf::Image image );

		// Sets the X position of the sprite on the screen.
		void SetX( float X );

		// Sets the Y position of the sprite on the screen.
		void SetY( float Y );

		// Sets the X and Y position of the sprite on the screen.
		void SetXY( float X, float Y );

		// Moves the sprite's X value.
		void MoveX( float X );

		// Moves the sprite's Y value.
		void MoveY( float Y );

		// Move the sprite's X and Y value.
		void MoveXY( float X, float Y );

		// Rotate the sprite up to 360 degrees ( which would be a full circle ).
		void RotateSprite( float degrees );

		// Returns the sprite.
		sf::Sprite GetSprite();

	private:

		// Temporary image to be used for the sprite.
		sf::Image tempImage;

		// The sprite that will point to the image.
		sf::Sprite tempSprite;
	
	};

	// Sets the image for the sprite.
	void Sprite::SetImage( const sf::Image image )
	{

		tempImage = image;
	
		tempSprite.SetImage( tempImage );
	
	}

	// Sets the X position of the sprite on the screen.
	void Sprite::SetX( float X )
	{
	
		tempSprite.SetX( X );
	
	}

	// Sets the Y position of the sprite on the screen.
	void Sprite::SetY( float Y )
	{
	
		tempSprite.SetY( Y );
	
	}

	// Sets the X and Y position of the sprite on the screen.
	void Sprite::SetXY( float X, float Y )
	{
	
		tempSprite.SetX( X );
		tempSprite.SetY( Y );
	
	}

	// Moves the sprite's X value.
	void Sprite::MoveX( float X )
	{
	
		tempSprite.Move( X, 0 );
	
	}

	// Moves the sprite's Y value.
	void Sprite::MoveY( float Y )
	{
	
		tempSprite.Move( 0, Y );
	
	}

	// Move the sprite's X and Y value.
	void Sprite::MoveXY( float X, float Y )
	{
	
		tempSprite.Move( X, Y );
	
	}

	// Rotate the sprite up to 360 degrees ( which would be a full circle ).
	void Sprite::RotateSprite( float degrees = 0 )
	{
	
		tempSprite.Rotate( degrees );
	
	}

	// Returns the sprite.
	sf::Sprite Sprite::GetSprite()
	{
	
		return tempSprite;
	
	}

}

/*^*^* GRAPHICS SECTION *^*^*/



/*-*-* WINDOW SECTION *-*-*/

namespace Ninja
{

	class Window
	{
	public:

		// Gives private variables values.
		Window();

		// Creates the window with set parameters. Default style is sf::Style::Close.
		void Create( const std::string title, unsigned int Width, unsigned int Height, unsigned int Bpp );

		/* 

		Creates the window with set parameters. Set the style to be 0, 1, 2, 3, 4, 5, or 6.
		Any other value assigned to 'Style' will automatically create the window with the default style.

		0: None - No border / title bar (this flag and all others are mutually exclusive).
		1: Titlebar - Title bar + fixed border.
		2: Resize - Titlebar + resizable border + maximize button.
		3: Close - Titlebar + close button.
		4: Resize and Close - Titlebar + resizable border + maximize button + close button.
		5: Titlebar and Close - Title bar + fixed border + close button.
		6: Fullscreen - Fullscreen mode (this flag and all others are mutually exclusive).
		
		*/
		void Create( const std::string title, unsigned int Width, unsigned int Height, unsigned int Bpp, short Style );

		// Clears/cleans the window and then displays the new image(s).
		void Update();

		// Determine if the window is still open or not.
		bool IsOpen();

		// Determines if there is an event to be processed.
		bool GetEvents();

		// Closes the window.
		void CloseWindow();

		// Renders an image to the screen.
		void Render( sf::Sprite image );

		// Renders text to the screen.
		void Render( sf::String string );

		// Checks the event(s) that were found in the GetEvents() cue and processes them for basic window events.
		std::string WindowEventsType();

		// Checks the event(s) that were found in the GetEvents() cue and processes them for mouse events.
		std::string MouseEventsType();

		// Checks the event(s) that were found in the GetEvents() cue and processes them for keyboard events.
		std::string KeyboardEventsType();

		// Processes the event(s) to see what key on the keyboard is being pressed.
		std::string KeyboardKeyPressed();

		// Processes the event(s) to see what key on the keyboard is being released.
		std::string KeyboardKeyReleased();

		// Gets the 'x' value of the mouse on the screen.
		int MouseLocationX();

		// Gets the 'y' value of the mouse on the screen.
		int MouseLocationY();

		// Sets the VSync of the window to either true or false.
		void SetVSync( bool vSync );

		// Set the framerate of the thread.
		void SetFramerateCap( unsigned int framerateCap );

		// Get the duration of a frame in the window.
		float GetFrameDuration();

		// The program waits for the amount of time specified ( in seconds ).
		void Wait( float seconds );

	private:

		// Window parameters.
		unsigned int width;
		unsigned int height;
		unsigned int bpp;

		// The rendering window created.
		sf::RenderWindow* NWindowPointer;

		// The event cue.
		sf::Event Event;

		int mousePositionX;
		int mousePositionY;

	};

	// Sets the default variable values for the window.
	Window::Window()
	{
	
		// Default window parameters.
		width = 800;
		height = 600;
		bpp = 32;
	
	}

	// Creates the window, with either custom parameters, or the default parameters.
	void Window::Create( const std::string title, unsigned int Width = 0, unsigned int Height = 0, unsigned int Bpp = 0 )
	{

		// Checks to see if a custom width was provided or not.
		if( Width == 0 )
		{
		
			// Sets the width of the window to the default.
			Width = width;
		
		}

		// Checks to see if a custom height was provided or not.
		if( Height == 0 )
		{
		
			// Sets the height of the window to the default.
			Height = height;
		
		}

		// Checks to see if a custom bpp was provided or not.
		if( Bpp == 0 )
		{
		
			// Sets the bpp of the window to the default.
			Bpp = bpp;
		
		}

		// Create window.
		NWindowPointer = new sf::RenderWindow( sf::VideoMode( Width, Height, Bpp ), title, sf::Style::Close );

	}

	/* 

		Creates the window with set parameters. Set the style to be 0, 1, 2, 3, 4, 5, or 6.
		Any other value assigned to 'Style' will automatically create the window with the default style.

		0: None - No border / title bar (this flag and all others are mutually exclusive).
		1: Titlebar - Title bar + fixed border.
		2: Resize - Titlebar + resizable border + maximize button.
		3: Close - Titlebar + close button.
		4: Resize and Close - Titlebar + resizable border + maximize button + close button.
		5: Titlebar and Close - Title bar + fixed border + close button.
		6: Fullscreen - Fullscreen mode (this flag and all others are mutually exclusive).
		
	*/
	void Window::Create( const std::string title, unsigned int Width, unsigned int Height, unsigned int Bpp, short Style )
	{
	
		// Checks to see if a custom width was provided or not.
		if( Width == 0 )
		{
		
			// Sets the width of the window to the default.
			Width = width;
		
		}

		// Checks to see if a custom height was provided or not.
		if( Height == 0 )
		{
		
			// Sets the height of the window to the default.
			Height = height;
		
		}

		// Checks to see if a custom bpp was provided or not.
		if( Bpp == 0 )
		{
		
			// Sets the bpp of the window to the default.
			Bpp = bpp;
		
		}

		if( Style == 0 )
		{
		
			// Create window.
			NWindowPointer = new sf::RenderWindow( sf::VideoMode( Width, Height, Bpp ), title, sf::Style::None );
		
		}else if( Style == 1 )
		{
		
			// Create window.
			NWindowPointer = new sf::RenderWindow( sf::VideoMode( Width, Height, Bpp ), title, sf::Style::Titlebar );
		
		}else if( Style == 2 )
		{
		
			// Create window.
			NWindowPointer = new sf::RenderWindow( sf::VideoMode( Width, Height, Bpp ), title, sf::Style::Resize );
		
		}else if( Style == 3 )
		{
		
			// Create window.
			NWindowPointer = new sf::RenderWindow( sf::VideoMode( Width, Height, Bpp ), title, sf::Style::Close );
		
		}else if( Style == 4 )
		{
		
			// Create window.
			NWindowPointer = new sf::RenderWindow( sf::VideoMode( Width, Height, Bpp ), title, sf::Style::Resize | sf::Style::Close );
		
		}else if( Style == 5 )
		{
		
			// Create window.
			NWindowPointer = new sf::RenderWindow( sf::VideoMode( Width, Height, Bpp ), title, sf::Style::Titlebar | sf::Style::Close );
		
		}else if( Style == 6 )
		{
		
			// Create window.
			NWindowPointer = new sf::RenderWindow( sf::VideoMode( Width, Height, Bpp ), title, sf::Style::Fullscreen );
		
		}else
		{
		
			// Create window.
			NWindowPointer = new sf::RenderWindow( sf::VideoMode( Width, Height, Bpp ), title, sf::Style::Close );
		
		}
	
	}

	// Updates the window/screen by clearing it and displaying the newly given data.
	void Window::Update()
	{
	
		// Displays new data.
		NWindowPointer->Display();

		// Cleans the screen.
		NWindowPointer->Clear();
	
	}

	// Checks to see if the window is open or not.
	bool Window::IsOpen()
	{

		// Returns true if the window is open.
		if( NWindowPointer->IsOpened() )
		{
		
			return true;
		
		}
	
		// Returns false if the window is no longer open.
		return false;
	
	}

	// Gets the events from the event cue.
	bool Window::GetEvents()
	{
	
		// If there is an events in the event cue, return true.
		if( NWindowPointer->GetEvent( Event ) )
		{
		
			return true;
		
		}

		// Return false if there is no event in the event cue.
		return false;
	
	}

	// Closes the window.
	void Window::CloseWindow()
	{
	
		// Closes the window.
		NWindowPointer->Close();
	
	}

	// Renders a sprite image to the window/screen.
	void Window::Render( sf::Sprite image )
	{
	
		// Draws the image.
		NWindowPointer->Draw( image );
	
	}

	// Renders text to the screen.
	void Window::Render( sf::String string )
	{
	
		NWindowPointer->Draw( string );
	
	}

	// Processes the event(s) that were taken from the cue for basic window events.
	std::string Window::WindowEventsType()
	{
	
		// Checks type of the event.
		switch( Event.Type )
		{
		
			// The event is the 'X' exit button being clicked.
			case sf::Event::Closed: 
			return "Closed";
			break;

			// The event is the window has been resized.
			case sf::Event::Resized: 
			return "Resized";
			break;

			// The event is the window has lost focus ( the user moved to a different window ).
			case sf::Event::LostFocus: 
			return "LostFocus";
			break;

			// The event is the window had gained focus ( the user moved to the window ).
			case sf::Event::GainedFocus: 
			return "GainedFocus";
			break;
		
		}

		// The event attempting to be processed is not supported in the function.
		return "Failed";
	
	}

	// Processes the event(s) that were taken from the cue for mouse events.
	std::string Window::MouseEventsType()
	{
	
		// Checks type of the event.
		switch( Event.Type )
		{
		
			// The event is a mouse button being pressed.
			case sf::Event::MouseButtonPressed:
			return "MouseButtonPressed";
			break;

			// The event is a mouse button being released.
			case sf::Event::MouseButtonReleased:
			return "MouseButtonReleased";
			break;

			// The event is a mouse wheel being moved.
			case sf::Event::MouseWheelMoved:
			return "MouseWheelMoved";
			break;

			// The event is the mouse cursor being moved.
			case sf::Event::MouseMoved:
			return "MouseMoved";
			break;

			// The event is the mouse entering the window's relative location.
			case sf::Event::MouseEntered:
			return "MouseEntered";
			break;

			// The event is the mouse left the window's relative location.
			case sf::Event::MouseLeft:
			return "MouseLeft";
			break;
		
		}
		
		// The event attempting to be processed is not supported in the function.
		return "Failed";
	
	}

	// Processes the event(s) that were taken from the cue for keyboard events.
	std::string Window::KeyboardEventsType()
	{

		// Checks type of the event.
		switch( Event.Type )
		{
		
			// The event is a keyboard button being pressed.
			case sf::Event::KeyPressed:
			return "KeyPressed";
			break;

			// The event is a keyboard button being released.
			case sf::Event::KeyReleased:
			return "KeyReleased";
			break;
		
		}
	
		// The event attempting to be processed is not supported in the function.
		return "Failed";
	
	}

	// Processes the event(s) to see what key on the keyboard is being pressed.
	std::string Window::KeyboardKeyPressed()
	{

		if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::A ) )
		{
		
			return "A";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::B ) )
		{
		
			return "B";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::C ) )
		{
		
			return "C";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::D ) )
		{
		
			return "D";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::E ) )
		{
		
			return "E";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F ) )
		{
		
			return "F";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::G ) )
		{
		
			return "G";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::H ) )
		{
		
			return "H";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::I ) )
		{
		
			return "I";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::J ) )
		{
		
			return "J";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::K ) )
		{
		
			return "K";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::L ) )
		{
		
			return "L";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::M ) )
		{
		
			return "M";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::N ) )
		{
		
			return "N";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::O ) )
		{
		
			return "O";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::P ) )
		{
		
			return "P";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Q ) )
		{
		
			return "Q";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::R ) )
		{
		
			return "R";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::S ) )
		{
		
			return "S";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::T ) )
		{
		
			return "T";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::U ) )
		{
		
			return "U";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::V ) )
		{
		
			return "V";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::W ) )
		{
		
			return "W";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::X ) )
		{
		
			return "X";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Y ) )
		{
		
			return "Y";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Z ) )
		{
		
			return "Z";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Num0 ) )
		{
		
			return "0";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Num1 ) )
		{
		
			return "1";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Num2 ) )
		{
		
			return "2";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Num3 ) )
		{
		
			return "3";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Num4 ) )
		{
		
			return "4";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Num5 ) )
		{
		
			return "5";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Num6 ) )
		{
		
			return "6";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Num7 ) )
		{
		
			return "7";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Num8 ) )
		{
		
			return "8";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Num9 ) )
		{
		
			return "9";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Numpad0 ) )
		{
		
			return "Numpad0";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Numpad1 ) )
		{
		
			return "Numpad1";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Numpad2 ) )
		{
		
			return "Numpad2";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Numpad3 ) )
		{
		
			return "Numpad3";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Numpad4 ) )
		{
		
			return "Numpad4";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Numpad5 ) )
		{
		
			return "Numpad5";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Numpad6 ) )
		{
		
			return "Numpad6";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Numpad7 ) )
		{
		
			return "Numpad7";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Numpad8 ) )
		{
		
			return "Numpad8";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Numpad9 ) )
		{
		
			return "Numpad9";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F1 ) )
		{
		
			return "F1";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F2 ) )
		{
		
			return "F2";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F3 ) )
		{
		
			return "F3";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F4 ) )
		{
		
			return "F4";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F5 ) )
		{
		
			return "F5";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F6 ) )
		{
		
			return "F6";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F7 ) )
		{
		
			return "F7";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F8 ) )
		{
		
			return "F8";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F9 ) )
		{
		
			return "F9";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F10 ) )
		{
		
			return "F10";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F11 ) )
		{
		
			return "F11";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F12 ) )
		{
		
			return "F12";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F13 ) )
		{
		
			return "F13";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F14 ) )
		{
		
			return "F14";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::F15 ) )
		{
		
			return "F15";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::LControl ) )
		{
		
			return "LControl";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::RControl ) )
		{
		
			return "RControl";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::LAlt ) )
		{
		
			return "LAlt";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::RAlt ) )
		{
		
			return "RAlt";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::LShift ) )
		{
		
			return "LShift";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::RShift ) )
		{
		
			return "RShift";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Space ) )
		{
		
			return "Space";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Return ) )
		{
		
			return "Return";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Back ) )
		{
		
			return "Back";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Tab ) )
		{
		
			return "Tab";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::PageUp ) )
		{
		
			return "PageUp";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::PageDown ) )
		{
		
			return "PageDown";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::End ) )
		{
		
			return "End";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Home ) )
		{
		
			return "Home";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Insert ) )
		{
		
			return "Insert";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Delete ) )
		{
		
			return "Delete";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Left ) )
		{
		
			return "Left";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Right ) )
		{
		
			return "Right";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Up ) )
		{
		
			return "Up";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Down ) )
		{
		
			return "Down";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::LBracket ) )
		{
		
			return "LBracket";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::RBracket ) )
		{
		
			return "RBracket";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::SemiColon ) )
		{
		
			return "SemiColon";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Comma ) )
		{
		
			return "Comma";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Period ) )
		{
		
			return "Period";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Quote ) )
		{
		
			return "Quote";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Slash ) )
		{
		
			return "Slash";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::BackSlash ) )
		{
		
			return "BackSlash";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Tilde ) )
		{
		
			return "Tilde";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Equal ) )
		{
		
			return "Equal";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Dash ) )
		{
		
			return "Dash";
		
		}else if ( ( Event.Type == sf::Event::KeyPressed ) && ( Event.Key.Code == sf::Key::Escape ) )
		{
		
			return "Escape";
		
		}else
		{
		
			// The event attempting to be processed is not supported in the function.
			return "Failed";
		
		}

	}

	// Processes the event(s) to see what key on the keyboard is being released.
	std::string Window::KeyboardKeyReleased()
	{

		if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::A ) )
		{
		
			return "A";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::B ) )
		{
		
			return "B";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::C ) )
		{
		
			return "C";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::D ) )
		{
		
			return "D";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::E ) )
		{
		
			return "E";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F ) )
		{
		
			return "F";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::G ) )
		{
		
			return "G";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::H ) )
		{
		
			return "H";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::I ) )
		{
		
			return "I";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::J ) )
		{
		
			return "J";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::K ) )
		{
		
			return "K";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::L ) )
		{
		
			return "L";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::M ) )
		{
		
			return "M";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::N ) )
		{
		
			return "N";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::O ) )
		{
		
			return "O";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::P ) )
		{
		
			return "P";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Q ) )
		{
		
			return "Q";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::R ) )
		{
		
			return "R";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::S ) )
		{
		
			return "S";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::T ) )
		{
		
			return "T";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::U ) )
		{
		
			return "U";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::V ) )
		{
		
			return "V";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::W ) )
		{
		
			return "W";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::X ) )
		{
		
			return "X";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Y ) )
		{
		
			return "Y";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Z ) )
		{
		
			return "Z";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Num0 ) )
		{
		
			return "0";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Num1 ) )
		{
		
			return "1";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Num2 ) )
		{
		
			return "2";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Num3 ) )
		{
		
			return "3";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Num4 ) )
		{
		
			return "4";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Num5 ) )
		{
		
			return "5";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Num6 ) )
		{
		
			return "6";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Num7 ) )
		{
		
			return "7";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Num8 ) )
		{
		
			return "8";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Num9 ) )
		{
		
			return "9";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Numpad0 ) )
		{
		
			return "Numpad0";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Numpad1 ) )
		{
		
			return "Numpad1";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Numpad2 ) )
		{
		
			return "Numpad2";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Numpad3 ) )
		{
		
			return "Numpad3";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Numpad4 ) )
		{
		
			return "Numpad4";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Numpad5 ) )
		{
		
			return "Numpad5";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Numpad6 ) )
		{
		
			return "Numpad6";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Numpad7 ) )
		{
		
			return "Numpad7";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Numpad8 ) )
		{
		
			return "Numpad8";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Numpad9 ) )
		{
		
			return "Numpad9";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F1 ) )
		{
		
			return "F1";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F2 ) )
		{
		
			return "F2";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F3 ) )
		{
		
			return "F3";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F4 ) )
		{
		
			return "F4";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F5 ) )
		{
		
			return "F5";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F6 ) )
		{
		
			return "F6";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F7 ) )
		{
		
			return "F7";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F8 ) )
		{
		
			return "F8";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F9 ) )
		{
		
			return "F9";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F10 ) )
		{
		
			return "F10";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F11 ) )
		{
		
			return "F11";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F12 ) )
		{
		
			return "F12";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F13 ) )
		{
		
			return "F13";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F14 ) )
		{
		
			return "F14";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::F15 ) )
		{
		
			return "F15";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::LControl ) )
		{
		
			return "LControl";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::RControl ) )
		{
		
			return "RControl";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::LAlt ) )
		{
		
			return "LAlt";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::RAlt ) )
		{
		
			return "RAlt";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::LShift ) )
		{
		
			return "LShift";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::RShift ) )
		{
		
			return "RShift";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Space ) )
		{
		
			return "Space";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Return ) )
		{
		
			return "Return";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Back ) )
		{
		
			return "Back";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Tab ) )
		{
		
			return "Tab";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::PageUp ) )
		{
		
			return "PageUp";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::PageDown ) )
		{
		
			return "PageDown";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::End ) )
		{
		
			return "End";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Home ) )
		{
		
			return "Home";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Insert ) )
		{
		
			return "Insert";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Delete ) )
		{
		
			return "Delete";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Left ) )
		{
		
			return "Left";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Right ) )
		{
		
			return "Right";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Up ) )
		{
		
			return "Up";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Down ) )
		{
		
			return "Down";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::LBracket ) )
		{
		
			return "LBracket";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::RBracket ) )
		{
		
			return "RBracket";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::SemiColon ) )
		{
		
			return "SemiColon";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Comma ) )
		{
		
			return "Comma";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Period ) )
		{
		
			return "Period";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Quote ) )
		{
		
			return "Quote";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Slash ) )
		{
		
			return "Slash";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::BackSlash ) )
		{
		
			return "BackSlash";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Tilde ) )
		{
		
			return "Tilde";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Equal ) )
		{
		
			return "Equal";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Dash ) )
		{
		
			return "Dash";
		
		}else if ( ( Event.Type == sf::Event::KeyReleased ) && ( Event.Key.Code == sf::Key::Escape ) )
		{
		
			return "Escape";
		
		}else
		{
		
			// The event attempting to be processed is not supported in the function.
			return "Failed";
		
		}
	
	}

	// Returns the location of the mouse cursor relative to the window ( X ).
	int Window::MouseLocationX()
	{

		mousePositionX = Event.MouseButton.X;
	
		// The location of the mouse cursor's x value.
		return Event.MouseButton.X;
	
	}

	// Returns the location of the mouse cursor relative to the window ( Y ).
	int Window::MouseLocationY()
	{

		mousePositionY = Event.MouseButton.Y;
	
		// The location of the mouse cursor's y value.
		return Event.MouseButton.Y;
	
	}

	// Set the framerate of the thread.
	void Window::SetFramerateCap( unsigned int framerateCap )
	{
	
		NWindowPointer->SetFramerateLimit( framerateCap );
	
	}

	// Sets the VSync of the window to either true or false.
	void Window::SetVSync( bool vSync )
	{
	
		NWindowPointer->UseVerticalSync( vSync );
	
	}

	// Get the duration of a frame in the window.
	float Window::GetFrameDuration()
	{
	
		return NWindowPointer->GetFrameTime();
	
	}

	// The program waits for the amount of time specified ( in seconds ).
	void Window::Wait( float seconds )
	{
	
		sf::Sleep( seconds );
	
	}

}

/*^*^* WINDOW SECTION *^*^*/



/*-*-* GUI SECTION *-*-*/

namespace Ninja
{

	class Button
	{
	public:

		// Sets the location and size of the button.
		void Location( float locX, float locY, int sizeX, int sizeY );

		// Checks to see if the button has been clicked.
		bool IsClicked( Window window );

	private:

		// Location and size of the button.
		float locationX;
		float locationY;
		int sizeX;
		int sizeY;
	
	};

	// Sets the location and size of the button.
	void Button::Location( float locX, float locY, int width, int height )
	{
	
		// Sets the location and size of the button.
		locationX = locX;
		locationY = locY;
		sizeX = width;
		sizeY = height;
	
	}

	// Checks to see if the button has been clicked.
	bool Button::IsClicked( Window window )
	{

		if( window.MouseEventsType() == "MouseButtonPressed" )
		{
	
			if( window.MouseLocationX() >= locationX && window.MouseLocationX() <= (int)( sizeX + locationX ) &&
				window.MouseLocationY() >= locationY && window.MouseLocationY() <= (int)( sizeY + locationY ) )
			{
					
				return true;
					
			}else
			{
		
				return false;
		
			}

		}

		return false;
	
	}

}

/*^*^* GUI SECTION *^*^*/



/*-*-* AUDIO SECTION *-*-*/

namespace Ninja
{

	class Music
	{
	public:

		// The default variables are set.
		Music( std::size_t BufferSize );

		// Loads the music file at the location specified.
		void LoadMusic( const std::string filelocation );

		// Get the duration of the music.
		float GetMusicDuration();

		// Play the music.
		void PlayMusic();

		// Stop the music.
		void StopMusic();

		// Change if the music should be looped or not.
		void LoopMusic( bool loop );

	private:

		// The temporary music file created.
		sf::Music tempMusic;

		// The buffer size used for samples.
		std::size_t bufferSize;
	
	};

	// The default variables are set.
	Music::Music( std::size_t BuffSize = 44100 )
	{
	
		bufferSize = BuffSize;
	
	}

	// Loads the music file at the location specified.
	void Music::LoadMusic( const std::string filelocation )
	{
	
		tempMusic.OpenFromFile( filelocation );
	
	}

	// Get the duration of the music.
	float Music::GetMusicDuration()
	{
	
		return tempMusic.GetDuration();
	
	}

	// Play the music.
	void Music::PlayMusic()
	{
	
		tempMusic.Play();
	
	}

	// Stop the music.
	void Music::StopMusic()
	{
	
		tempMusic.Stop();
	
	}

	// Change if the music should be looped or not.
	void Music::LoopMusic( bool loop )
	{
	
		tempMusic.SetLoop( loop );
	
	}

	class Sound
	{
	public:

		// Loads the sound file to be used.
		void LoadSound( std::string soundFile );

		// Sets if the sound will loop or not.
		void SetLoop( bool loop );

		// Sets the pitch of the sound. Default is 1.
		void SetPitch( float pitch );

		// Sets the volume of the sound. Default is 100.
		void SetVolume( float volume );

		// Plays the sound.
		void Sound::PlaySound();

		// Pauses the sound.
		void Sound::PauseSound();

		// Stops the sound.
		void Sound::StopSound();

	private:

		// The sound file.
		sf::Sound sound;

		// The sound buffer that will use the samples from the file selected.
		sf::SoundBuffer soundBuffer;
	
	};

	// Loads the sound file to be used.
	void Sound::LoadSound( std::string soundFile )
	{
	
		soundBuffer.LoadFromFile( soundFile );

		sound.SetBuffer( soundBuffer );
	
	}

	// Sets if the sound will loop or not.
	void Sound::SetLoop( bool loop )
	{
	
		sound.SetLoop( loop );
	
	}

	// Sets the pitch of the sound. Default is 1.
	void Sound::SetPitch( float pitch )
	{
	
		sound.SetPitch( pitch );
	
	}

	// Sets the volume of the sound. Default is 100.
	void Sound::SetVolume( float volume )
	{
	
		sound.SetVolume( volume );
	
	}

	// Plays the sound.
	void Sound::PlaySound()
	{
	
		sound.Play();
	
	}

	// Pauses the sound.
	void Sound::PauseSound()
	{
	
		sound.Pause();
	
	}

	// Stops the sound.
	void Sound::StopSound()
	{

		sound.Stop();

	}

}

/*^*^* AUDIO SECTION *^*^*/



/*-*-* TIME SECTION *-*-*/

namespace Ninja
{

	class Timer
	{
	public:

		// The default constructor.
		Timer::Timer();

		// Get the time from the last reset of the timer.
		float GetTime();

		// Reset the timer to 0.
		void ResetTimer();

	private:

		// Clock to get time.
		sf::Clock tempClock;

	};

	// The default constructor.
	Timer::Timer()
	{
	
		// The default constructor.
	
	}

	// Get the time from the last reset of the timer.
	float Timer::GetTime()
	{
	
		return tempClock.GetElapsedTime();
	
	}

	// Reset the timer to 0.
	void Timer::ResetTimer()
	{
	
		tempClock.Reset();
	
	}

}

/*^*^* TIME SECTION *^*^*/



/*-*-* FILEIO SECTION *-*-*/

namespace Ninja
{

	class FileIO
	{
	public:

		// Default constructor.
		FileIO();

		// Set the name of the file.
		FileIO( std::string filename );

		// Close the file if not done so already.
		~FileIO();

		// Set the pointer to the beginning of the file.
		void SetAtBeg();

		// Set the pointer to the end of the file.
		void SetAtEnd();

		// Write a string to the file. Can have a new line after written values.
		void WriteString( std::string string, bool newline );

		// Write a char to the file. Can have a new line after written values.
		void WriteChar( char character, bool newline );

		// Write an int to the file. Can have a new line after written values.
		void WriteInt( int integer, bool newline );

		// Write a short to the file. Can have a new line after written values.
		void WriteShort( short shortInteger, bool newline );

		// Write a long to the file. Can have a new line after written values.
		void WriteLong( long longInteger, bool newline );

		// Write a float to the file. Can have a new line after written values.
		void WriteFloat( float floatValue, bool newline );

		// Write a double to the file. Can have a new line after written values.
		void WriteDouble( double doubleValue, bool newline );

		// Creates/Opens a file to be written and read from.
		void Open( std::string filename );

		// Get the position of the get stream pointer.
		int TellGetStreamPointer();

		// Get the position of the put stream pointer.
		int TellPutStreamPointer();

		// Set the position of the get stream pointer.
		void SetGetStreamPointer( int position );

		// Set the position of the put stream pointer.
		void SetPutStreamPointer( int position );

		// Set the position of the get stream pointer by line.
		void SetGetStreamPointerLine( int line );

		// Set the position of the put stream pointer by line.
		void SetPutStreamPointerLine( int line );

		// Finds the character specified in the current line in the file.
		int Find( char character );

		// Gets the whole line in front of the Get pointer. Stops at the end of the line,
		// and sets the pointer to the beginning of the next line.
		std::string GetLine();

		// Deletes the file.
		void Delete();

		// Deletes the data inside the file ( not deleting the file itself ).
		void DeleteData();

		// Close the file.
		void Close();

	private:

		// The file stream and name of file.
		std::string fileName;
		std::fstream File;

		// The temporary string to hold line data.
		std::string tempString;

		// The lcoation of data in tempString.
		size_t location;

		// The debugging variable for streaming to the debug file and console output.
		Ninja::Debugger tempDebug;
	
	};

	// Default constructor.
	FileIO::FileIO()
	{
	
		// Default constructor.
	
	}

	// Set the name of the file.
	FileIO::FileIO( std::string filename )
	{

		fileName = filename;
	
		File.open( fileName.c_str(), std::fstream::in | std::fstream::out | std::fstream::app | std::fstream::end );
	
	}

	// Close the file if not done so already.
	FileIO::~FileIO()
	{
	
		// If the file has not been closed yet.
		if( File.is_open() == true )
		{
		
			File.close();
		
		}
	
	}

	// Set the pointer to the beginning of the file.
	void FileIO::SetAtBeg()
	{

		// If the file has not been closed yet.
		if( File.is_open() == true )
		{
		
			File.close();
		
		}
	
		File.open( fileName.c_str(), std::fstream::in | std::fstream::out | std::fstream::beg );
	
	}

	// Set the pointer to the end of the file.
	void FileIO::SetAtEnd()
	{

		// If the file has not been closed yet.
		if( File.is_open() == true )
		{
		
			File.close();
		
		}
	
		File.open( fileName.c_str(), std::fstream::in | std::fstream::out | std::fstream::ate );
	
	}

	// Write a string to the file. Can have a new line after written values.
	void FileIO::WriteString( std::string string, bool newline = false )
	{

		std::ofstream stream( fileName.c_str(), std::ofstream::out | std::ofstream::app | std::ofstream::end );
	
		if( stream.is_open() == true )
		{
		
			stream << string;

			if( newline == true )
			{
			
				stream << "\n";
			
			}
	
		}
	
	}

	// Write a char to the file. Can have a new line after written values.
	void FileIO::WriteChar( char character, bool newline = false )
	{
	
		std::ofstream stream( fileName.c_str(), std::ofstream::out | std::ofstream::app | std::ofstream::end );
	
		if( stream.is_open() == true )
		{
		
			stream << character;

			if( newline == true )
			{
			
				stream << "\n";
			
			}
	
		}
	
	}

	// Write an int to the file. Can have a new line after written values.
	void FileIO::WriteInt( int integer, bool newline = false )
	{
	
		std::ofstream stream( fileName.c_str(), std::ofstream::out | std::ofstream::app | std::ofstream::end );
	
		if( stream.is_open() == true )
		{
		
			stream << integer;

			if( newline == true )
			{
			
				stream << "\n";
			
			}
	
		}
	
	}

	// Write a short to the file. Can have a new line after written values.
	void FileIO::WriteShort( short shortInteger, bool newline = false )
	{
	
		std::ofstream stream( fileName.c_str(), std::ofstream::out | std::ofstream::app | std::ofstream::end );
	
		if( stream.is_open() == true )
		{
		
			stream << shortInteger;

			if( newline == true )
			{
			
				stream << "\n";
			
			}
	
		}
	
	}

	// Write a long to the file. Can have a new line after written values.
	void FileIO::WriteLong( long longInteger, bool newline = false )
	{
	
		std::ofstream stream( fileName.c_str(), std::ofstream::out | std::ofstream::app | std::ofstream::end );
	
		if( stream.is_open() == true )
		{
		
			stream << longInteger;

			if( newline == true )
			{
			
				stream << "\n";
			
			}
	
		}
	
	}

	// Write a float to the file. Can have a new line after written values.
	void FileIO::WriteFloat( float floatValue, bool newline = false )
	{

		std::ofstream stream( fileName.c_str(), std::ofstream::out | std::ofstream::app | std::ofstream::end );
	
		if( stream.is_open() == true )
		{
		
			stream << floatValue;

			if( newline == true )
			{
			
				stream << "\n";
			
			}
	
		}
	
	}

	// Write a double to the file. Can have a new line after written values.
	void FileIO::WriteDouble( double doubleValue, bool newline = false )
	{
	
		std::ofstream stream( fileName.c_str(), std::ofstream::out | std::ofstream::app | std::ofstream::end );
	
		if( stream.is_open() == true )
		{
		
			stream << doubleValue;

			if( newline == true )
			{
			
				stream << "\n";
			
			}
	
		}
	
	}

	// Creates/Opens a file to be written and read from.
	void FileIO::Open( std::string filename )
	{

		fileName = filename;
	
		File.open( fileName.c_str(), std::fstream::in | std::fstream::out | std::fstream::app | std::fstream::end );
	
	}

	// Get the position of the get stream pointer.
	int FileIO::TellGetStreamPointer()
	{
	
		return File.tellg();
	
	}

	// Get the position of the put stream pointer.
	int FileIO::TellPutStreamPointer()
	{
	
		return File.tellp();
	
	}

	// Set the position of the get stream pointer.
	void FileIO::SetGetStreamPointer( int position )
	{
	
		File.seekg( position );
	
	}

	// Set the position of the put stream pointer.
	void FileIO::SetPutStreamPointer( int position )
	{
	
		File.seekp( position );
	
	}

	// Set the position of the get stream pointer by line.
	void FileIO::SetGetStreamPointerLine( int line )
	{

		SetAtBeg();
	
		int lineCount = 1;

		if( line != 1 )
		{
		
			while( lineCount != line )
			{
		
				GetLine();

				lineCount++;
		
			}
		
		}else
		{
		
			File.seekg( 0 );
		
		}
	
	}

	// Set the position of the put stream pointer by line.
	void FileIO::SetPutStreamPointerLine( int line )
	{

		SetAtBeg();
	
		int lineCount = 1;

		if( line != 1 )
		{
		
			while( lineCount != line )
			{
		
				GetLine();

				lineCount++;
		
			}

			File.seekp( File.tellg() );
		
		}else
		{
		
			File.seekp( 0 );
		
		}
	
	}

	// Finds the character specified in the current line in the file.
	// Returns the position of the character as an integer.
	int FileIO::Find( char character )
	{
	
		tempString = GetLine();

		// Gets the location of the character in the string.
		location = tempString.find( character );

		// If the character was found in the string.
		if( location != std::string::npos )
		{
		
			return (int)location;
		
		}else
		{
		
			return -1;
		
		}
	
	}

	// Gets the whole line in front of the Get pointer. Stops at the end of the line,
	// and sets the pointer to the beginning of the next line.
	std::string FileIO::GetLine()
	{

		std::string line;
	
		std::getline( File, line );

		return line;
	
	}

	// Deletes the file.
	void FileIO::Delete()
	{
	
		if( File.is_open() == true )
		{

			File.close();
		
		}

		std::remove( fileName.c_str() );
	
	}

	// Deletes the data inside the file ( not deleting the file itself ).
	void FileIO::DeleteData()
	{
	
		std::ofstream stream( fileName.c_str(), std::ofstream::out | std::ofstream::trunc );
	
	}

	// Close the file.
	void FileIO::Close()
	{
	
		// If the file has not been closed yet.
		if( File.is_open() == true )
		{
		
			File.close();
		
		}
	
	}

}

/*^*^* FILEIO SECTION *^*^*/



/*-*-* MISCELLANEOUS SECTION *-*-*/

namespace Ninja
{

	class RandNumGen
	{
	public:

		// Automatically places a seed for the generator.
		RandNumGen();

		// Seeds the generator to the latest system time.
		void Seed();

		// Returns a random int.
		int randomInt( int minimum, int maximum );

		// Returns a random short.
		short randomShort( short minimum, short maximum );

		// Returns a random long.
		long randomLong( long minimum, long maximum );

	private:

		

	};

	// Automatically places a seed for the generator.
	RandNumGen::RandNumGen()
	{

		srand( (unsigned)time( 0 ) );

	}

	// Seeds the generator to the latest system time.
	void RandNumGen::Seed()
	{

		srand( (unsigned)time( 0 ) );

	}

	// Returns a random int.
	int RandNumGen::randomInt( int minimum, int maximum )
	{

		return ( rand() % maximum ) + minimum;

	}

	// Returns a random short.
	short RandNumGen::randomShort( short minimum, short maximum )
	{

		return ( rand() % maximum ) + minimum;

	}


	// Returns a random long.
	long RandNumGen::randomLong( long minimum, long maximum )
	{

		return ( rand() % maximum ) + minimum;

	}

	class StringStream
	{
	public:

		// The default constructor.
		StringStream();

		// Read three std::string's into the string stream.
		void ReadIn( std::string string, std::string string2, std::string string3 );
		// Read two std::string's into the string stream.
		void ReadIn( std::string string, std::string string2 );
		// Read an std::string into the string stream.
		void ReadIn( std::string string );

		// Read three integer's into the string stream.
		void ReadIn( int integer, int integer2, int integer3 );
		// Read two integer's into the string stream.
		void ReadIn( int integer, int integer2 );
		// Read an integer into the string stream.
		void ReadIn( int integer );

		// Read three character's into the string stream.
		void ReadIn( char character, char character2, char character3 );
		// Read two character's into the string stream.
		void ReadIn( char character, char character2 );
		// Read a character into the string stream.
		void ReadIn( char character );

		// Read three short's into the string stream.
		void ReadIn( short shortInteger, short shortInteger2, short shortInteger3 );
		// Read two short's into the string stream.
		void ReadIn( short shortInteger, short shortInteger2 );
		// Read a short into the string stream.
		void ReadIn( short shortInteger );

		// Read three long's into the string stream.
		void ReadIn( long longInteger, long longInteger2, long longInteger3 );
		// Read two long's into the string stream.
		void ReadIn( long longInteger, long longInteger2 );
		// Read a long into the string stream.
		void ReadIn( long longInteger );

		// Read three float's into the string stream.
		void ReadIn( float floatingValue, float floatingValue2, float floatingValue3 );
		// Read two float's into the string stream.
		void ReadIn( float floatingValue, float floatingValue2 );
		// Read a float into the string stream.
		void ReadIn( float floatingValue );

		// Read three double's into the string stream.
		void ReadIn( double doubleValue, double doubleValue2, double doubleValue3 );
		// Read two double's into the string stream.
		void ReadIn( double doubleValue, double doubleValue2 );
		// Read a double into the string stream.
		void ReadIn( double doubleValue );

		// Returns the content of the stream as a string.
		std::string GetStringAsString();

		// Returns the content of the stream as an integer.
		int GetStringAsInt();

		// Returns the content of the stream as a short integer.
		short GetStringAsShort();

		// Returns the content of the stream as a long integer.
		long GetStringAsLong();

		// Returns the content of the stream as a floating value.
		float GetStringAsFloat();

		// Returns the content of the stream as a double value.
		double GetStringAsDouble();

		// Clears the string stream for input.
		void Clear();

	private:

		// The string stream.
		std::stringstream tempStream;
	
	};

	// The default constructor.
	StringStream::StringStream()
	{
	
		// The default constructor.
	
	}

	// Read three std::string's into the string stream.
	void StringStream::ReadIn( std::string string, std::string string2, std::string string3 )
	{
	
		tempStream << string << string2 << string3;
	
	}

	// Read two std::string's into the string stream.
	void StringStream::ReadIn( std::string string, std::string string2 )
	{
	
		tempStream << string << string2;
	
	}

	// Read an std::string into the string stream.
	void StringStream::ReadIn( std::string string )
	{
	
		tempStream << string;
	
	}

	// Read three integer's into the string stream.
	void StringStream::ReadIn( int integer, int integer2, int integer3 )
	{
	
		tempStream << integer << integer2 << integer3;
	
	}

	// Read two integer's into the string stream.
	void StringStream::ReadIn( int integer, int integer2 )
	{
	
		tempStream << integer << integer2;
	
	}

	// Read an integer into the string stream.
	void StringStream::ReadIn( int integer )
	{
	
		tempStream << integer;
	
	}

	// Read three character's into the string stream.
	void StringStream::ReadIn( char character, char character2, char character3 )
	{
	
		tempStream << character << character2 << character3;
	
	}

	// Read two character's into the string stream.
	void StringStream::ReadIn( char character, char character2 )
	{
	
		tempStream << character << character2;
	
	}

	// Read a character into the string stream.
	void StringStream::ReadIn( char character )
	{
	
		tempStream << character;
	
	}

	// Read three short's into the string stream.
	void StringStream::ReadIn( short shortInteger, short shortInteger2, short shortInteger3 )
	{
	
		tempStream << shortInteger << shortInteger2 << shortInteger3;
	
	}

	// Read two short's into the string stream.
	void StringStream::ReadIn( short shortInteger, short shortInteger2 )
	{
	
		tempStream << shortInteger << shortInteger2;
	
	}

	// Read a short into the string stream.
	void StringStream::ReadIn( short shortInteger )
	{
	
		tempStream << shortInteger;
	
	}

	// Read three long's into the string stream.
	void StringStream::ReadIn( long longInteger, long longInteger2, long longInteger3 )
	{
	
		tempStream << longInteger << longInteger2 << longInteger3;
	
	}

	// Read two long's into the string stream.
	void StringStream::ReadIn( long longInteger, long longInteger2 )
	{
	
		tempStream << longInteger << longInteger2;
	
	}

	// Read a long into the string stream.
	void StringStream::ReadIn( long longInteger )
	{
	
		tempStream << longInteger;
	
	}

	// Read three float's into the string stream.
	void StringStream::ReadIn( float floatingValue, float floatingValue2, float floatingValue3 )
	{
	
		tempStream << floatingValue << floatingValue2 << floatingValue3;
	
	}

	// Read two float's into the string stream.
	void StringStream::ReadIn( float floatingValue, float floatingValue2 )
	{
	
		tempStream << floatingValue << floatingValue2;
	
	}

	// Read a float into the string stream.
	void StringStream::ReadIn( float floatingValue )
	{
	
		tempStream << floatingValue;
	
	}

	// Read three double's into the string stream.
	void StringStream::ReadIn( double doubleValue, double doubleValue2, double doubleValue3 )
	{
	
		tempStream << doubleValue << doubleValue2 << doubleValue3;
	
	}

	// Read two double's into the string stream.
	void StringStream::ReadIn( double doubleValue, double doubleValue2 )
	{
	
		tempStream << doubleValue << doubleValue2;
	
	}

	// Read a double into the string stream.
	void StringStream::ReadIn( double doubleValue )
	{
	
		tempStream << doubleValue;
	
	}

	// Clears the string stream for input.
	void StringStream::Clear()
	{
	
		tempStream.str( "" );
		tempStream.clear();
	
	}

	// Returns the string of the stream.
	std::string StringStream::GetStringAsString()
	{
	
		return tempStream.str();
	
	}

	// Returns the content of the stream as an integer.
	int StringStream::GetStringAsInt()
	{

		int integer = 0;

		tempStream >> integer;
	
		return integer;
	
	}

	// Returns the content of the stream as a short integer.
	short StringStream::GetStringAsShort()
	{
	
		short shortInteger = 0;

		tempStream >> shortInteger;
	
		return shortInteger;
	
	}

	// Returns the content of the stream as a long integer.
	long StringStream::GetStringAsLong()
	{
	
		long longInteger = 0;

		tempStream >> longInteger;
	
		return longInteger;
	
	}

	// Returns the content of the stream as a floating value.
	float StringStream::GetStringAsFloat()
	{
	
		float floatingValue = 0.f;

		tempStream >> floatingValue;
	
		return floatingValue;
	
	}

	// Returns the content of the stream as a double value.
	double StringStream::GetStringAsDouble()
	{
	
		double doubleValue = 0.0;

		tempStream >> doubleValue;
	
		return doubleValue;
	
	}

}

/*^*^* MISCELLANEOUS SECTION *^*^*/

#endif